package strategy;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Map;

/**
 * 折扣
 */
public class ZKDiscount implements ICouponDiscount<Integer>{
    /**
     * 满减计算
     *  满n减多少
     * @param info
     * @param skuPrice
     * @return
     */
    @Override
    public BigDecimal amount(Integer info, BigDecimal skuPrice) {
        return skuPrice.multiply(new BigDecimal(info)).divide(new BigDecimal(100),2, RoundingMode.HALF_UP);
    }
}
